package project.background.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Lob;
import javax.persistence.Table;

import fld.background.system.dto.annotation.Des;
import fld.background.system.entity.AUTOIDModel;
import lombok.Getter;
import lombok.Setter;

@Des("企业新闻")
@Setter
@Getter
@Entity
@Table(name = "t_company_news")
public class News extends AUTOIDModel {
	private static final long serialVersionUID = 1L;

	@Des("所属企业ID")
	@Column(name = "companyId",nullable=false)
	private Long companyId;
	
	@Des("标题")
	@Column(name = "title",length = 100,nullable=false)
	private String title;

	@Des("发布日期")
	@Column(name = "publishDate",nullable=false)
	private Date publishDate;

	@Des("概要")
	@Column(name = "brief",length = 2000)
	private String brief;
	
	@Des("详情")
	@Lob
	@Column(name = "details")
	private String details;
	
	@Des("访问量")
	@Column(name = "pv", nullable = false,columnDefinition="INT default 0")
	private Integer pv;
	
}